package com.tts.dto;

import com.tts.entity.User;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class UserInfoDTO {
    private Long id;
    private String username;
    private User.UserRole role;
    private User.UserStatus status;

    public static UserInfoDTO fromUser(User user) {
        return UserInfoDTO.builder()
            .id(user.getId())
            .username(user.getUsername())
            .role(user.getRole())
            .status(user.getStatus())
            .build();
    }
} 